%
Dim Plus
Set Plus = New Cls_Plus
Plus.Open("guestbook") ' 打开配置文件
plus.state
plus.newtpl("plus_guestbook.html")
' 留言显示
Dim Page
Page = Request("p")
If Len(Page) = 0 Or Not IsNumeric(Page) Then Page = 1
If Page < 1 Then Page = 1
Page = int(Page)
If Len(Session("Guestbook_User")) < 1 Then Session("Guestbook_User") = "Guest"
Dim Rs
Set Rs = DB("select [User],[IP],[Time],[Content],[ReComment] From [{pre}guestbook] Where [State]=1 Order by [ID] asc",2)
Dim GuestBook,GuestBookPageList
Dim Poster,Repost,UserIP
Poster = Plus.Lang("js-poster")
Repost = Plus.Lang("js-repost")
If Not Rs.Eof Then
Rs.Pagesize = Plus.Config("pagesize")
Rs.absolutePage = Page
Dim i
For i = 1 to Rs.Pagesize
If Rs.eof Then Exit For
UserIP = Split(Rs(1),".")
GuestBook = GuestBook & "
" & Vbcrlf
GuestBook = GuestBook & "- "& i &" 楼:" & Rs(0) & "(" & UserIP(0) & "." & UserIP(1) & "." & UserIP(2) & ".*) " & Poster & "" & Rs(2) & "
" & VbCrlf
GuestBook = GuestBook & "- " & Replace(Replace(Rs(3),Vbcrlf,""),"""","\""") & "
" & VbCrlf
If Len(Rs(4))>0 Then
GuestBook = GuestBook & Repost & "" & Replace(Replace(Rs(4),Vbcrlf,""),"""","\""") & "" & VbCrlf
End If
GuestBook = GuestBook & " " & VbCrlf
GuestBook = GuestBook & "
" & VbCrlf
Rs.MoveNext
Next
For i = 1 to Rs.Pagecount
If Page = i Then
GuestBookPageList = GuestBookPageList & "" & i & ""
Else
GuestBookPageList = GuestBookPageList & "" & i & ""
End If
Next
End If
if err then response.write "
" & plus.lang("scripterror") & ":" & err.description
call plus.settpl("{url}","index.asp")
call plus.settpl("{title}","留言板")
call plus.settpl("{guestbooks}",RS.RecordCount)
call plus.settpl("{pagelist}",GuestBookPageList)
call plus.settpl("{contentmax}",Plus.Config("contentmax"))
call plus.settpl("{comment}",GuestBook)
response.write plus.gettpl
set plus = nothing
%>